

public class strings {
    public static void main(String[] args) {
        String s1 = "hello";
        String s2 = "world";
        int x = s1.indexOf("l");
        int y = s1.lastIndexOf("l");
        System.out.println(x);
        System.out.println(y);

        String str = "hello world hello bit" ;
        String[] result = str.split(" ",2) ;
        for(String s: result) {
            System.out.println(s);
        }
    }
}
